package com.share.design.memo;

import lombok.Data;

/**
 * 发起人
 * author:caifan
 * date:2020/2/6
 */
@Data
public class Originator {
    private String state;

    public Memento createMemento() {
        return new Memento(state);
    }

    public void restoreMemento(Memento memento) {
        this.setState(memento.getState());
    }
}
